import axios from 'axios'

axios.defaults.baseURL = 'http://localhost:8888/api'

export const getNewsList = () => axios.get('/getnewslist')

// 获取新闻详情页面
export const getNewsDetail = id => axios.get(`/getnew/${id}`)

// 根据id获取评论内容
export const getCommentInfo = (id, pageindex) => axios.get(`/getcomments/${id}`, { params: { pageindex: pageindex } })
